package fausto.news 
{
	import flash.display.Sprite;
	/**
	 * ...
	 * @author Ben.
	 */
	public class NewsContent extends Sprite
	{
		
		private var _i:Infos
		private var _d:XML
		private var _ni:NewsItem
		
		public function NewsContent() 
		{
			visible = false;
			_i = Infos.getInstance();
		}
		
		public function createNews():void
		{
			_d = _i.theXML.part[0];
			
			var yInit:int = 130;
			
			for (var i:int = 0; i < _d.news.length(); i++)
			{
				_ni = new NewsItem(_d.news[i], i);
				_ni.y = yInit;
				
				addChild(_ni);
				
				yInit += 140;
			}
		}
		
	}

}